class StudentBase {
    int baseNum = 2988;

}

abstract class InnerStudentBase {
    int innerBaseNum = 1988;

    public abstract InnerStudentBase info();
}


class Student extends StudentBase {
    private String name;
    private int age;
    private int num = 100;

    public Student() {
        name = new String("");
        age = 16;
    }

    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public Student show() {
        System.out.printf("Student name = %s, age = %d\n", name, age);
        return this;
    }

    public Student info() {
        System.out.printf("Student info!\n");
        return this;
    }

    public Student inner() {
        InnerStudent is = new InnerStudent();
        is.num = 399;
        is.info();
        return this;
    }

    public InnerStudent getInner(int num) {
        return new InnerStudent(num);
    }

    private class InnerStudent extends InnerStudentBase {
        int num;

        public InnerStudent() {
            num = 0;
        }

        public InnerStudent(int num) {
            this.num = num;
            age = num;
        }

        public InnerStudentBase info() {
            show();
            System.out.printf("InnerStudent num = %d, Student num = %d\n",
                                num, Student.this.num);
            System.out.printf("innerBaseNum = %d, baseNum = %d\n", innerBaseNum, baseNum);
            Student.this.info();
            return this;
        }
    }
}

public class innerTest {
    static public void main(String [] args) {
        Student s = new Student("张三", 26);
        // Student.InnerStudent is = s.new InnerStudent(190);
        // Student.InnerStudent is = s.getInner(190);
        InnerStudentBase is = s.getInner(100);

        // s.show();
        is.info();
        // s.inner();
    }
}
